#ifndef FGE_MATH_HPP
#define FGE_MATH_HPP

#include "wm5/Wm5Vector2.h"
#include "wm5/Wm5Matrix3.h"

namespace fge
{

typedef Wm5::Vector2<float> Vector2;
typedef Wm5::Vector3<float> Vector3;
typedef Wm5::Matrix3<float> Matrix3;

struct Vertex
{
	float x, y;
	float u, v;
	float r, g, b, a;
};

struct Rect
{
	Rect()
	{
	}

	Rect(int x, int y, int w, int h)
	{
		this->x = x;
		this->y = y;
		this->w = w;
		this->h = h;
	}

	int x, y, w, h;
};

Matrix3 CreateScaleMatrix(float x, float y);
Matrix3 CreateTranslationMatrix(float x, float y);
Matrix3 CreateRotationMatrix(float r);

template <typename Type>
Type Lerp(const Type &a, const Type &b, float t)
{
	return a + (b - a) * t;
}

template<typename Type>
bool bxor(const Type &lhs, const Type &rhs)
{
    return !( lhs && rhs ) && ( lhs || rhs );
}

}

#endif//FGE_MATH_HPP
